package com.tiancheng.trade.order.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Data
@Configuration
@ConfigurationProperties(prefix = "callback")
public class CallbackConfig {
    /**
     * 签名
     */
    private String signKey;
    /**
     * 交换机
     */
    private String exchange;
    /**
     * 交换机
     */
    private String retryExchange;
    /**
     * 最大重试次数
     */
    private int maxAttempts=200;
    /**
     * 初始重试间隔
     */
    private long initialInterval=1000;
    /**
     * 倍率
     */
    private double multiplier;
    /**
     * 重试最大间隔
     */
    private long maxInterval;
    private List<BizConfig> configs;
    @Data
    public static class BizConfig {
        private String clientId;
        private String queue;
        private String routingKey;
    }
}
